Factorial Calculator

Form

Results

Fraction Percentage

0

1

What is Factorial Calculator?

A factorial multiplies all the positive integers from one up to a chosen whole number. The notation 5! means 5 × 4 × 3 × 2 × 1, which equals 120. The exclamation mark is part of the mathematical notation; it does not mean that the input is being squared or multiplied by itself five times.

Use this calculator to check small factorials, count possible orderings or work through a combinations problem. Ordinary factorials are defined here for nonnegative integers. Enter a whole number such as 0, 4 or 8, rather than a negative number or a decimal.

2

How to Use This Calculator

  1. Enter the nonnegative integer n whose factorial you need.
  2. Choose Calculate to multiply the integers from 1 through n.
  3. For a small input, write the product out and check it by hand.
  4. Keep the result as an exact integer if your problem requires an exact count. Very large factorials can exceed the server’s exact numeric precision.

The form is a factorial evaluator, not a complete permutation or combination calculator. If a question gives an expression such as 8!/(3!5!), calculate the required factorials and then perform the remaining division, or use a dedicated combinations tool.

3

Formula Used

n! = 1 × 2 × 3 × … × n for positive integers n; 0! = 1; n! = n × (n − 1)! for n ≥ 1.
4

Variables Explained

QuantityExplanation
nA whole-number count of objects or factors. For the ordinary factorial, n must be zero or a positive integer.
n!The product through n. It is a count, so small exact factorials have no fractional part.
0!The special starting value 1, consistent with an empty product and with the recurrence for 1!.
5

Worked Example

For n = 6, build the product in stages: 1 × 2 = 2, then × 3 = 6, × 4 = 24, × 5 = 120, and × 6 = 720. Therefore 6! = 720. You can also check it using the preceding factorial: 6 × 5! = 6 × 120 = 720.

Counting different arrangements

Imagine six different books in a row. There are six choices for the first position, five for the second and so on until only one remains. Multiplying those choices gives 6! = 720 possible orderings. This assumes all books are distinguishable and every ordering is allowed.

Cancel before calculating large products

An expression such as 10!/8! simplifies to 10 × 9 = 90 because the factors from 8 down to 1 cancel. Computing both large factorials first adds work and can introduce unnecessary rounding in software. Look for cancellation before entering numbers.

6

Why Use This Calculator?

Factorials appear in arrangements, permutations, combinations and probability. They count orderings when the objects are distinct. If objects repeat, or only some positions matter, the surrounding formula changes. The factorial remains one building block rather than a universal answer.

How quickly factorials grow

The first values are 0! = 1, 1! = 1, 2! = 2, 3! = 6, 4! = 24 and 5! = 120. By 10!, the result is 3,628,800. Each step multiplies by a larger integer, so growth soon becomes much faster than simply adding a fixed amount.

The implementation multiplies using ordinary server numeric types. Once a result is too large for exact integer storage it can be represented approximately, and sufficiently large inputs may not produce a usable response. This is a tool for ordinary worked examples, not an arbitrary-precision factorial library. A long printed number is not by itself proof that every digit is exact.

7

Common Mistakes

    • Enter an integer, not a decimal. This page does not evaluate the gamma function, which is a different extension of factorial notation.
    • Do not use a negative input. A loop returning a value for such an input would not establish a valid negative factorial.
    • Keep n! separate from nⁿ. For example, 4! is 24, while 4⁴ is 256.
    • Account for repeated objects in a counting problem. The number of distinct arrangements of A, A and B is 3!/2! = 3, rather than 6.
8

Frequently Asked Questions

Why is zero factorial equal to one?

The recurrence 1! = 1 × 0! requires 0! to be 1. The same value represents the one way to arrange no objects: leave the arrangement empty. It also makes combination formulas work at their endpoints.

What is the difference between a factorial and a power?

A factorial multiplies decreasing positive integers, while a power multiplies copies of the same base. For instance, 3! = 3 × 2 × 1 = 6, whereas 3³ = 3 × 3 × 3 = 27.

Can I use this for very large exact factorials?

Do not rely on ordinary server numbers to preserve every digit of a large factorial. Use software with arbitrary-precision integer arithmetic when exact large results are required, and simplify factorial ratios before evaluating them.

Does n! always count selections of n objects?

It counts orderings of n distinct objects when every ordering is allowed. Selecting objects without caring about order requires a combinations formula. Restrictions and repeated objects also change the count.

How many ordered choices are there when I use only some objects?

For r ordered positions filled from n distinct objects without replacement, the count is n!/(n − r)!. Choosing and ordering three objects from five gives 5!/2! = 5 × 4 × 3 = 60. This is smaller than 5! because the unused objects are not being arranged in the final result. If order does not matter, a further division by r! is needed.

9

Sources & References